package org.learn.spring_quartz.lib;

import jakarta.annotation.PostConstruct;
import org.springframework.stereotype.Component;

@Component
public class InitHolidayConfig {

    private final MyHolidayCalendar myHolidayCalendar;

    public InitHolidayConfig(MyHolidayCalendar myHolidayCalendar) {
        this.myHolidayCalendar = myHolidayCalendar;
    }

    @PostConstruct
    public void init() throws Exception {
        myHolidayCalendar.addCalendar();
    }
}
